﻿using System.ComponentModel.DataAnnotations;
using ZeroAdmin.Core;

namespace ZeroAdmin.Application;

/// <summary>
/// 添加输入
/// </summary>
public class AddUserInput
{
    /// <summary>
    /// 姓名
    /// </summary>
    public string UserName { get; set; } = "";

    /// <summary>
    /// 手机号码
    /// </summary>
    [DataValidation(DataValidationTypeEnum.PhoneNumberValidate)]
    public string PhoneNumber { get; set; } = "";

    /// <summary>
    /// 密码
    /// </summary>
    public string Password { get; set; } = "";

    /// <summary>
    /// 角色ID
    /// </summary>
    public long RoleId { get; set; }
}

/// <summary>
/// 更新用户输入
/// </summary>
public class UpdateUserInput : AddUserInput
{
    /// <summary>
    /// 用户ID
    /// </summary>
    public long UserId { get; set; }
}

/// <summary>
/// 用户信息查询输入
/// </summary>
public class QueryUserInput : PageInputBase
{
    /// <summary>
    /// 姓名
    /// </summary>    
    public string UserName { get; set; } = "";

    /// <summary>
    /// 手机号码
    /// </summary>    
    public string PhoneNumber { get; set; } = "";

    /// <summary>
    /// 角色ID
    /// </summary>
    public long RoleId { get; set; }
}

/// <summary>
/// 用户查询输出
/// </summary>
public class QueryUserOutput
{
    /// <summary>
    /// 角色ID
    /// </summary>
    public long UserId { get; set; }

    /// <summary>
    /// 姓名
    /// </summary>
    public string UserName { get; set; } = "";

    /// <summary>
    /// 手机号码
    /// </summary>
    public string PhoneNumber { get; set; } = "";

    /// <summary>
    /// 最后登入时间
    /// </summary>
    public DateTime LastLoginTime { get; set; }

    /// <summary>
    /// 角色ID
    /// </summary>
    public long RoleId { get; set; }

    /// <summary>
    /// 角色名称
    /// </summary>
    public string RoleName { get; set; } = "";

    /// <summary>
    /// 角色权限
    /// </summary>
    public string RolePermission { get; set; } = "";
}